<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
<title>酒店内部管理系统</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="themes/bootstrap/easyui.css" rel="stylesheet">
<link href="themes/icon.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/easyui-lang-zh_CN.js"></script>
<script src="js/loginjs.js"></script>
<script src="js/bootstrap.min.js"></script>
</head>
<body style="background-image: url(img/loufang.jpg); background-size: cover;">

	<div id="win" class="easyui-window" title="登陆界面"
		style="width: 600px; height: 250px;"
		data-options="iconCls:'icon-man',modal:true,closable:false,maximizable:false,minimizable:false">
		<div class="easyui-panel"
			style="text-align: center; background-image: url(img/1.jpg); background-size: cover;"
			data-options="fit:true">
		   <form id="login">
			    <div class="form-group has-feedback">
					<label style="margin-left: -530px;">用户名：</label> <input type="text"
						class="form-control" name="uId" placeholder="请输入用户号">
				</div>
				<div class="form-group">
					<label style="margin-left: -530px;">密码：</label>
					 <input type="password" class="form-control" name="upsw"
						placeholder="Password">
				</div>


			</form>
			<div style="text-align: center; padding: 5px 0">
				<a class="easyui-linkbutton" onclick="submitForm()"
					style="width: 80px" data-options="text:'登录'"></a> <a
					class="easyui-linkbutton" onclick="clearForm()" style="width: 80px"
					data-options="text:'清空'"></a> <a href="#">忘记密码？</a>
			</div>
		</div>
	</div>
	<script>
		//下面是通过请求转移实现
		$('#login').form({
			url : 'loginAction',
			type : 'post',
			success : function(data) {
				//alert(data);
				if (data == '1') {
					location.href = "showMain";
				} else {
					$.messager.confirm('提示', '无此用户，重新登录', function(r) {
						if (r) {
							$('#login').form('clear');
						}
					});

				}

			}
		});
		function submitForm() {
			$('#login').form('submit');
		}
		function clearForm() {
			$('#login').form('clear');
		}
	</script>
</body>
</html>